﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Snake.Core;

namespace Snake.SQL.SQLNode
{
    public class Top : ISQLNode
    {
        private readonly IValueProvider _valueProvider;

        public Top(IValueProvider valueProvider)
        {
            _valueProvider = valueProvider;
        }

        public void Render(SQLWriter writer)
        {
            writer.Append(SQLStrings.Top + '(' + _valueProvider.ParamName + ')');
        }
    }
}
